package com.meilai.project.service.business.sale.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.meilai.project.entity.business.sale.BillSaleMediaDetail;
import com.meilai.project.mapper.business.sale.BillSaleMediaDetailMapper;
import com.meilai.project.service.business.sale.BillSaleMediaDetailService;
import com.meilai.project.vo.business.sale.BillSaleMediaDetailVO;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class BillSaleMediaDetailServiceImpl extends ServiceImpl<BillSaleMediaDetailMapper, BillSaleMediaDetail> implements BillSaleMediaDetailService {
    @Override
    public int deleteByBillSaleId(Long bill_sale_id) {
        return baseMapper.deleteByBillSaleId(bill_sale_id);
    }

    @Override
    public List<BillSaleMediaDetailVO> selectByBillSaleId(Long bill_sale_id) {
        return baseMapper.selectByBillSaleId(bill_sale_id);
    }

    @Override
    public List<BillSaleMediaDetailVO> getByBillSaleId(Long bill_sale_id,Long bill_sale_detail_id) {
        return baseMapper.getByBillSaleId(bill_sale_id,bill_sale_detail_id);
    }

    @Override
    public BigDecimal getTotalExecutedAmount(Long contract_id) {
        return baseMapper.getTotalExecutedAmount(contract_id);
    }

    @Override
    public void updateIsMarket(Long marketDetailId, Long billSaleDetailId) {
        baseMapper.updateIsMarket(marketDetailId,billSaleDetailId);
    }
}
